﻿using System.Text;

namespace StubRssService
{
    public static class Log
    {
        private static readonly StringBuilder Storage = new StringBuilder();

        public static void Clear()
        {
            lock (Storage)
                Storage.Clear();
        }

        public static void Store(string message, params object [] args)
        {
            lock (Storage)
                Storage.AppendLine(string.Format(message, args));
        }

        public static string LogDump
        {
            get { lock (Storage) return Storage.ToString(); }
        }
    }
}